import config from "@/config"
import http from "@/utils/request"

export default {
	sys: {
		getWebsite: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/getWebsite`,
			name: "获取网站信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		getCopyright: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/getCopyright`,
			name: "获取备案信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setWebsite: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/setWebsite`,
			name: "设置网站信息",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		setCopyright: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/setCopyright`,
			name: "设置版权备案",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
	storage: {
		lists: {
			url: `${config.API_URL}/adminapi/setting.storage/lists`,
			name: "获取存储引擎列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setup: {
			url: `${config.API_URL}/adminapi/setting.storage/setup`,
			name: "获取备案信息",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/setting.storage/detail`,
			name: "获取备案信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
	weapp: {
		getConfig: {
			url: `${config.API_URL}/adminapi/channel.mnp_settings/getConfig`,
			name: "获取小程序配置",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setConfig: {
			url: `${config.API_URL}/adminapi/channel.mnp_settings/setConfig`,
			name: "设置小程序配置",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
	wx_oa:{
		getConfig: {
			url: `${config.API_URL}/adminapi/channel.official_account_setting/getConfig`,
			name: "获取公众号配置",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setConfig: {
			url: `${config.API_URL}/adminapi/channel.official_account_setting/setConfig`,
			name: "设置公众号配置",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    setparams:{
        url: `${config.API_URL}/adminapi/stock.Switch/all`,
        name: "参数配置",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    editparams:{
        url: `${config.API_URL}/adminapi/stock.Switch/edit`,
        name: "参数修改状态",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    }
}
